home *** CD-ROM | disk | FTP | other *** search
- --------?-SWG-------------------------------
-
- Since the inception of SWAG over two years ago, it has become a standard
- library used by PASCAL programmers all over the world. I often receive
- mail from users wanting to create their own SWAG packets. Therefore, I'm
- releasing SWAGADD which is the program that I use to create the new
- snipets every 90 days.
-
- SWAG (.SWG) files are actually highly compressed LZH archive files with
- extensions to the header and a double splayed sliding dictionary
- compressed buffer.
-
- The SWAG file headers have this structure :
-
- TYPE
- SwagHeader =
- RECORD
- HeadSize : BYTE; {size of header}
- HeadChk : BYTE; {checksum for header}
- HeadID : ARRAY [1..5] OF CHAR; {compression type tag}
- NewSize : LONGINT; {compressed size}
- OrigSize : LONGINT; {original size}
- Time : WORD; {packed time}
- Date : WORD; {packed date}
- Attr : WORD; {file attributes and flags}
- BufCRC : LONGINT; {32-CRC of the Buffer }
- Swag : STRING[12]; {stored SWAG filename}
- Subject : STRING[40]; {snipet subject}
- Contrib : STRING[35]; {contributor}
- Keys : STRING[70]; {search keys, comma deliminated}
- FName : PathStr; {filename (variable length)}
- CRC : WORD; {16-bit CRC (immediately follows FName)}
- END;
-
- Following each header is a highly compressed buffer optimized for space
- and extraction speed. This makes the extraction or viewing of snipets
- VERY VERY FAST. Unfortunately, you WILL NOT be able to use standard LZH
- code to decompress this buffer, however, you'll find code in the SWAG
- distribution to read the headers. Maybe someday, I'll release the
- decompression code to the public domain, but for now, it's copyrighted,
- and unavailable.
-